package com.sitech.portal.server.dao.ibatis;

import java.util.HashMap;
import java.util.List;

import com.sitech.ibnms.core.BaseIbnmsDao;
import com.sitech.portal.server.dao.IShortcutDao;
import com.sitech.portal.server.domain.Shortcut;
import com.sitech.portal.server.domain.ShortcutType;
import com.sitech.portal.server.form.ShortcutForm;

public class ShortcutDaoImpl extends BaseIbnmsDao implements IShortcutDao {

	@Override
	public void delete(Shortcut shortcut) throws Exception {
		super.delete("deleteShortcut",shortcut);
	}

	@Override
	public void deleteType(ShortcutType shortcutType) throws Exception {
		super.delete("deleteShortcutType", shortcutType);

	}

	@Override
	public List<ShortcutType> queryType(String loginId) throws Exception {
		return this.query("queryShortcutType", loginId);
	}

	@Override
	public void save(Shortcut shortcut) throws Exception {
		super.insert("saveShortcut", shortcut);
	}
	
	@Override
	public void update(Shortcut shortcut) throws Exception{
		this.update("updateShortcut", shortcut);
	}

	@Override
	public void saveType(ShortcutType shortcutType) throws Exception {
		super.insert("saveShortcutType",shortcutType);

	}

	@Override
	public List<Shortcut> queryShortcut(String loginId) throws Exception {
		return this.query("queryShortcut",loginId);
	}

	@Override
	public List<HashMap> queryShortcutByType(String loginId,String shortcutType)
			throws Exception {
		HashMap map = new HashMap();
		map.put("LOGINID", loginId);
		map.put("SHORTCUTTYPE", shortcutType);
		return this.query("queryShortcutByType",map);
	}

	@Override
	public void updateType(ShortcutType shortcutType) throws Exception {
		// TODO Auto-generated method stub
		this.update("updateShortcutType", shortcutType);
	}

}
